package com.bright.hxj.cwduijie.repository;

import com.bright.hxj.cwduijie.pojo.po.AssistCode;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface AssistCodeRepository extends JpaRepository<AssistCode, Integer>, JpaSpecificationExecutor<AssistCode> {

    @Query("from AssistCode where ZT_DATA_KEY=:ztDataKey and sjjhbz in (:sjjhbz) and opType=:opType")
    List<AssistCode> getByZtDataKeyAndOpTypeAndSjjhbz(@Param("ztDataKey") String ztDataKey, @Param("opType") Integer opType, @Param("sjjhbz") List<Integer> sjjhbz);

}